<template>
	<view>
		<qiun-title-bar :title="chartOpt.title" />
		<view class="charts-box">
			<qiun-data-charts type="line" :chartData="chartData" :opts="options" :eopts="options" :ontouch="true" :disableScroll="true" />
		</view>
	</view>

</template>

<script>
	export default {
		props: ['chartData', 'chartOpt'],
		data() {
			return {
				options: {
					"dataLabel": false,
					"padding": [0, 0, 0, 0],
					"enableScroll": true,
					"disableScroll": true,
					"xAxis": {
						"disableGrid": false,
						"rotateLabel": true,
						"itemCount": 12,
						"scrollAlign": "right",
					},
					"yAxis": {
						showTitle: true,
						data: [{
							"title": '',
						}]
					},
					"legend": {
						"position": "top",
					},

				}
			};
		},
		onShow() {

		},
		onLoad() {

		},
		created() {
			this.options.yAxis.data[0].title = this.chartOpt.unit
		},
		methods: {

		}
	};
</script>

<style>
</style>

<style lang="scss" scoped>
	.charts-box {
		width: 100%;
		height: 600rpx;
		margin-bottom: 20rpx;
	}

	/deep/.qiun-title-bar {
		height: 20px;
	}

	/deep/.qiun-title-dot {
		height: 14px;
	}

	/deep/.qiun-title-text {
		font-size: 14px;
	}
</style>
